import axios from 'axios';

export default {
    //vuex中有数据请求时使用action
    getData (ctx, payload) {
        const { key, testType, model, subject } = payload;
        axios(
          `/api/jztk/query?model=${model}&subject=${subject}&testType=${testType}&key=${key}`
        ).then(res => {
         ctx.commit('setData', res.data.result)
        })
      }
}